<?php
/**
 * JSONRenderer class definition
 *   
 * @author Sean Crystal <seancrystal@gmail.com>
 * @package MutantVole
 */
require_once 'interfaces/iViewRenderer.php';

/**
 * Simply renders all view properties as a JSON-encoded array. This can be used to
 * respond to AJAX requests.
 * @package MutantVole
 * @subpackage Renderers
 */    
class JSONRenderer extends ViewRenderer implements iViewRenderer {
	/**
     * Renders the views
	 */ 	
	public function Render() {
		$this->CoalesceViews();
		
		header('Content-type: application/json');
		header('Accept: application/json');
		
		echo json_encode($this->properties);		
	}
}

?>